﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace RhythmComet.Particles
{
    public struct ParticleVertex
    {
        public Vector3 Position;
        public Color Color;
        public float PointSize;

        public static int SizeInBytes = 8 * sizeof(float);

        public static VertexElement[] VertexElements = {
            new VertexElement(0, 0, VertexElementFormat.Vector3, VertexElementMethod.Default, VertexElementUsage.Position, 0),
            new VertexElement(0, sizeof(float) * 3, VertexElementFormat.Color, VertexElementMethod.Default, VertexElementUsage.Color, 0),
            new VertexElement(0, sizeof(float) * 4, VertexElementFormat.Single, VertexElementMethod.Default, VertexElementUsage.PointSize, 0) 
        };
    }

    public struct ParticleProperties
    {
        public Vector3 velocity;
        public Vector3 acceleration;
        public float lifeTime;
        public float rotation;
        public float rotationSpeed;
        public float timeSinceStart;
    }
}
